package net.lab1024.sa.admin.module.business.yct.yctTeeth.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDate;
import javax.validation.constraints.NotBlank;
import lombok.Data;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;
import net.lab1024.sa.base.common.json.serializer.FileKeyVoSerializer;

/**
 * 文章 新建表单
 *
 * @Author zhangben
 * @Date 2024-12-18 09:52:35
 * @Copyright 20241218
 */

@Data
public class ArticleAddForm {

    @Schema(description = "作者")
    private Integer userId;

    @Schema(description = "标题", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "标题 不能为空")
    private String title;

    @Schema(description = "文章内容")
    private String content;

    @Schema(description = "文章日期")
    private LocalDate articleDate;

    @Schema(description = "封面图片")
    @JsonSerialize(using = FileKeyVoSerializer.class)
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String coverImageUrl;

    @Schema(description = "简介")
    private String description;

    @Schema(description = "是否是视频")
    private Integer isVideo;


}